from urllib.request import urlopen
for line in urlopen('http://www.baidu.com'):
    line = line.decode('utf-8')
    if 'title' and '/title' in line:
        print(line)
